<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/5/6
 * Time: 13:49
 */
include 'AopClient.php';

class  Test{
    public function test(){
        $aop = new AopClient.php;
        $aop->gatewayUrl = 'https://openapi.alipay.com/gateway.do';
        $aop->appId = 'your app_id';
        $aop->rsaPrivateKeyFilePath = 'merchant_private_key_file';
        $aop->alipayPublicKey='alipay_public_key_file';
        $aop->apiVersion = '1.0';
        $aop->postCharset='GBK';
        $aop->format='json';
        $request = new AlipayTradeRefundRequest ();
        $request->setBizContent = "{
        'out_trade_no':'20150320010101001',
        'trade_no':'2014112611001004680 073956707',
        'refund_amount':200.12,
        'refund_reason':'正常退款',
        'out_request_no':'HZ01RF001',
        'operator_id':'OP001',
        'store_id':'NJ_S_001',
        'terminal_id':'NJ_T_001'
       }";
        $result = $aop->execute ( $request, NULL );
    }
}